#ifndef __MCU_CFG_H
#define __MCU_CFG_H

#include "sys.h"
#include "stm32f10x.h"
#include "delay.h"

#include "stdio.h"
#include "string.h"
#include "stdarg.h"	 
#include "math.h"
#include "ff.h"

#include "ar8035.h"
#include "fpga.h"
#include "gps.h"
#include "mmc_sd.h"
#include "play.h"
#include "rtc.h"
#include "stm32f10x_it.h"
//#include "timer.h"
#include "usart.h"
#include "usart2.h"
#include "GD_IAP.h"
#include "JLX320_00202.h"
#include "font.h"
#include "stdint.h"

#define SYNC_OUT	PAout(0)

#define TEST1		PCout(13)
#define TEST2		PBout(0)
#define SD_MODE		PBout(12)

#define FPGA_ACTIVE	0
#define FPGA_TEST	1
#define FPGA_INIT	2

typedef struct{
	u8 sdcard_state;
	u8 fpga_mode;
	char fpga_version[11];
}SYS_STATE;

extern SYS_STATE sys_state;
extern u8 fpga_state;
extern u8 sd_cnt_mode;
extern u8 high_speed_mode;

void Mcu_Cfg_Init(void);
void High_Speed_Cfg(u8 aaa);
extern void TIM3_Init(u16 arr,u16 psc);
#endif
